# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Balló György <ballogyor+arch at gmail dot com>

pkgname=libaccounts-glib
pkgver=1.26
pkgrel=2
pkgdesc='Glib-based client library for accessing the online accounts database'
arch=(loong64 x86_64)
url='https://gitlab.com/accounts-sso/libaccounts-glib'
license=(LGPL)
depends=(glib2 libxml2 sqlite)
makedepends=(python-gobject gobject-introspection vala meson check)
source=(https://gitlab.com/accounts-sso/libaccounts-glib/-/archive/VERSION_$pkgver/libaccounts-glib-VERSION_$pkgver.tar.gz)
sha256sums=('8bc05c4f4a9b0412a8a70b5ddd3b80e5f4fa2d38455a5ebe638599668a287393')

build() {
  meson $pkgname-VERSION_$pkgver build \
    -Dprefix=/usr
  meson compile -C build
}

check() {
  meson test -C build || true
}

package() {
  meson install -C build --destdir "$pkgdir"
}
